package com.yzt.dynamicmodule.banner;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;

import com.yzt.dynamicmodule.R;
import com.yzt.plugin_imageloader.ImageLoadUtil;
import com.zhouwei.mzbanner.holder.MZViewHolder;

/**
 * author : bob
 * date   : 2022/12/7
 * desc   : 用户详情顶部图片轮播
 */
public class IndexBannerViewHolder implements MZViewHolder<String> {

    private ImageView mBannerIv;

    @Override
    public View createView(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.layout_index_banner_item, null);
        mBannerIv = view.findViewById(R.id.banner_iv);
        return view;
    }

    @Override
    public void onBind(Context context, int position, String data) {
        ImageLoadUtil.loadImg(context, data, mBannerIv);
    }
}
